<?php
class Shop_Model_DbTable_Product extends Zend_Db_Table_Abstract {
	protected $_name ='shop_product';
	
	protected $_dependentTables = array(
		'Shop_Model_DbTable_HasCategory',
		'Shop_Model_DbTable_Image',
//		'Shop_Model_DbTable_Variant',
		'Shop_Model_DbTable_Promotion',
		'Shop_Model_DbTable_AttrValue'
    );
    
    protected $_referenceMap    = array(
        'Manufacturer' => array(
            'columns'           => 'manufacturer_id',
            'refTableClass'     => 'Shop_Model_DbTable_Manufacturer',
            'refColumns'        => 'id',
            'refColumnsAsName'  => 'name',
    		'onDelete'			=> self::CASCADE
        ),
        'Image' => array(
            'columns'           => 'image_id',
            'refTableClass'     => 'Shop_Model_DbTable_Image',
            'refColumns'        => 'id',
            'refColumnsAsName'  => 'name',
    		'onDelete'			=> self::CASCADE
        ),
        'AttrSet' => array(
            'columns'           => 'attr_set_id',
            'refTableClass'     => 'Shop_Model_DbTable_AttrSet',
            'refColumns'        => 'id',
            'refColumnsAsName'  => 'name',
    		'onDelete'			=> self::CASCADE
        )
    );
}